<template>
  <div>
    <div class="row_box"  >
      <div class="row_img">
        <img  style="width:100%;height:100%;" :src="product.thumbnail"/>
      </div>
      <div class="row_product">
        <div class="row_product_titleBox">
          <span class="row_product_title">{{product.name}}</span>
        </div>
        <span class="row_product_subtitle">{{product.subTitle}}</span>
        <div class="row_product_bottom">
          <div class="row_product_flex-end" v-if="!concise">
            <span class="row_product_price">¥{{product.price}}</span>
            <span class="label_evaluation" >888万人付款</span>
          </div>
          <div class="row_product_flex-end_concise" v-if="concise">
            <span class="row_product_price">¥{{product.price}}</span>
          </div>
          <!--
            <div class="label_item">
              <span class="label_title">活动</span>
            </div>
          </div> -->

          <span class="label_evaluation" v-if="!concise"> 888觉得好</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'row',
    props:['product','concise'],
  }
</script>

<style scoped>
  .row_box {
    display: flex;
    flex-direction: row;
    align-content: center;
    background-color: white;
    padding-left: 10px;
    /* padding-right: 20px; */
    box-sizing: border-box;

  }

  .row_img {
    width: 145px;
    height: 140px;
    overflow: hidden;
    border-radius: 3px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .row_product {
    margin-left: 10px;
    /* height: 145px; */
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 10px;
    /* box-sizing: border-box; */
    width: 210px;
    border-bottom: 1px solid #f2f2f2;
    position: relative;
    display: block;
    line-height: 20px;
    overflow: hidden;
    margin-top: 5px;
  }

  .row_product_titleBox {
    display: flex;
    flex-direction: row;
  }

  .row_product_title {
    font-size: 14px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .row_product_subtitle {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.3);
    display: block;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  .row_product_bottom {
    position: absolute;
    bottom: 5px;
  }

  .label_box {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 5px;
  }

  .label_item {
    width: 50px;
    height: 16px;
    border-radius: 3px;
    /* background: linear-gradient(0deg, rgba(236, 95, 88, 1), rgba(255, 230, 230, 1)); */
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(236, 95, 88, 1);
  }

  .label_title {
    font-size: 10px;
    color: rgba(236, 95, 88, 1);
    line-height: 16px;
    height: 16px;
    display: block;
  }

  .row_product_price {
    font-size: 16px;
    color: rgba(231, 91, 83, 1);
    font-weight: 700;
    margin-right: 5px;
    display: block;
    line-height: 20px;
  }

  .label_evaluation {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.3);
    display: block;
    line-height: 18px;
  }

  .row_product_flex-end {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    margin-bottom: 2px;
  }
.row_product_flex-end_concise{
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  margin-bottom: 2px;
  /*position: absolute;*/
  /*right: 15px;*/
}
</style>
